import http from '@/api/http';

export function login(data: any) {
  return http.post('/api/app/auth/login', data).then(res => res.data);
}

export function logout() {
  return http.post('/api/app/auth/logout').then(res => res.data);
}

// MS365认证相关API
export function ms365AuthCallback(code: string, state: string) {
  return http.post('/api/app/auth/ms-365-auth/callback', { code, state }).then(res => res.data);
}

export function getUserInfo() {
  return http.get('/api/app/auth/user-info').then(res => res.data);
} 